#!/bin/sh
path=$(dirname $(pwd)/$0)/

rm -rf ~/.Xdefaults
ln -s ${path}Xdefaults ~/.Xdefaults

rm -f ~/.bashrc
ln -s ${path}bashrc ~/.bashrc
rm -f ~/.bash_profile
ln -s ${path}bash_profile ~/.bash_profile

rm -f ~/.hgrc
ln -s ${path}hgrc ~/.hgrc

rm -rf ~/.gitconfig
ln -s ${path}gitconfig ~/.gitconfig

rm -f ~/.screenrc
ln -s ${path}screenrc ~/.screenrc

rm -f ~/.emacs-format-file
ln -s ${path}emacs-format-file ~/.emacs-format-file

rm -f ~/.emacs
ln -s ${path}emacs ~/.emacs

rm -rf ~/.vim_runtime
ln -s ${path}vim_runtime ~/.vim_runtime
sys=$(uname)
if [ "$1" == "Darwin" ]; then
    sh ~/.vim_runtime/install.sh mac
else
    sh ~/.vim_runtime/install.sh linux
fi
